1. Field of the Invention
The present invention relates to a technique for drawing three-dimensional graphics and, more specifically, to a method and an apparatus for drawing three-dimensional graphics capable of providing drawing effects such as motion, without the necessity of repeating complicated processes including geometrical operations.
2. Description of the Background Art
Recently, in order to enable output of realistic and delicate images on a personal computer or a home use game machine, developments of three-dimensional graphics drawing apparatuses performing three-dimensional image processing at high speed have been vigorously made. In a conventional three-dimensional graphics drawing apparatus, when a drawing primitive representing an object on an image plane is to be moved, coordinates and the like of the primitive that change as the primitive moves must be calculated by geometrical operations or coordinate operation processes frame by frame.
An expensive geometrical operation unit having high geometrical operation performance have been required in the three-dimensional graphics drawing apparatus in order to calculate coordinates and the like of the primitive mentioned above at high speed. This resulted in the problem of increased cost of the three-dimensional graphics drawing apparatus.
It may be possible to move the primitive by storing vertex data (vertex coordinate data, color data, transmissivity data, texture mapping coordinate data) of a polygon subjected to geometrical operation in advance in an external memory and by drawing the vertex data frame by frame, rather than providing the expensive geometrical operation unit in the three-dimensional graphics drawing apparatus. The amount of data of the moving primitive, however, is formidable, which means that an external memory of huge storage capacity is necessary.
An object of the present invention is to provide a method and an apparatus for drawing three-dimensional graphics capable of drawing a primitive that changes as it moves at high speed, with a geometrical operation unit of relatively low process performance.
Another object of the present invention is to provide a method and an apparatus for drawing three-dimensional graphics capable of drawing, at high speed, a primitive that changes as it moves, without necessitating an external memory of a huge storage capacity, even when a geometrical operation unit is not used.
According to an aspect of the present invention, the three-dimensional graphics drawing apparatus includes a geometrical operation unit generating vertex data of a polygon, an offset register storing an offset value for the vertex data of the polygon generated by the geometrical operation unit, an offset operating circuit performing an arithmetic operation on the vertex data of the polygon output from the geometrical operation unit using the offset value stored in the offset register, and a drawing unit drawing the polygon, based on the vertex data after the arithmetic operation by the offset operating circuit.
The offset operating circuit performs an arithmetic operation on the vertex data of the polygon output from the geometrical operation unit with the offset value stored in the offset register. Therefore, by successively updating the offset value stored in the offset register, it becomes possible to represent motion or the like of the primitive. Therefore, even with a geometrical operation unit having relatively low process performance, it is possible to draw a primitive that changes as it moves, for example, at high speed.
According to another aspect of the present invention, the three-dimensional graphics drawing apparatus includes a reading unit reading vertex data of a polygon, which have been subjected to geometrical operation in advance, an offset register storing an offset value for the vertex data of the polygon read by the reading unit, an offset operating circuit performing an arithmetic operation on the vertex data of the polygon read by the reading unit using the offset value stored in the offset register, and a drawing unit drawing the polygon based on the vertex data operated by the offset operating circuit.
The offset operating circuit performs an arithmetic operation on the vertex data of the polygon, which have been subjected to geometrical operation in advance, with the offset value stored in the offset register. Therefore, it becomes possible to represent motion of the primitive, for example, by successively updating the offset value stored in the offset register. Further, as the vertex data of the polygon that have been subjected to geometrical operation in advance are used, the geometrical operation unit, which has been necessary in the conventional three-dimensional graphics drawing apparatus, becomes unnecessary.
According to a still further aspect, the method of drawing three-dimensional graphics in accordance with the present invention includes the steps of reading vertex data of a polygon that have been subjected to geometrical operation in advance, operating the read vertex data of the polygon with an offset value, and drawing the polygon based on the vertex data after the arithmetic operation with the offset value.
As the vertex data of the polygon that have been subjected to geometrical operation in advance are operated with the offset value, it becomes possible to represent motion or the like of the primitive by successively updating the offset value. Further, as the vertex data of the polygon that have been subjected to geometrical operation in advance are used, the geometrical operation unit, which have been necessary in the conventional three-dimensional graphics drawing apparatus, becomes unnecessary.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.